package com.zhgxi.zf.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.slave4j.orm.hibernate.BaseEntity;

@Entity
@Table(name = "zf_menu")
public class Menu extends BaseEntity {

	@Column(name = "menuname", nullable = false, length = 20)
	private String menuname;

	@Column(name = "url", nullable = false, length = 40)
	private String url;

	@Column(name = "menutype")
	private boolean menutype;
	
	@Column(name = "menuorder")
	private Integer menuorder;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "mid", nullable = true)
	private Menu parent;

	public Menu() {
	}

	public String getMenuname() {
		return this.menuname;
	}

	public void setMenuname(String menuname) {
		this.menuname = menuname;
	}

	public String getUrl() {
		return this.url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public boolean isMenutype() {
		return menutype;
	}

	public void setMenutype(boolean menutype) {
		this.menutype = menutype;
	}


	public Menu getParent() {
		return parent;
	}

	public void setParent(Menu parent) {
		this.parent = parent;
	}

	public Integer getMenuorder() {
		return menuorder;
	}

	public void setMenuorder(Integer menuorder) {
		this.menuorder = menuorder;
	}

}